]> dgit.raspbian.org Git - gnome-shell.git/commit
extensionBase: Use UUID as fallback gettext domain
authorFlorian Müllner <fmuellner@gnome.org>
Fri, 11 Aug 2023 22:03:38 +0000 (00:03 +0200)
committerMarge Bot <marge-bot@gnome.org>
Tue, 29 Aug 2023 21:21:51 +0000 (21:21 +0000)
commita6d8e7ab6fe8cb3eaf30feb27434cc3ec725b291
treebb0e1424e70f7f265ddc46bb70027d4c894261fe
parent92ccfe7f65acc3e425def61c5084ccc606e0ecbb
extensionBase: Use UUID as fallback gettext domain

Nowadays we can set up translations automatically, but only when
the domain is provided with the metadata.

This can be a problem, for example our extension templates use
the automatic translation handling that we recommend, but as a
result the code will throw an error unless `gettext-domain` is
added to the metadata.

Binding a text domain is cheap enough to not care about unnecessary
or duplicated calls, so add a final fallback to the UUID when no
domain was provided as parameter or in the metadata.

There is already a precedent with the `gnome-extensions pack` command
that falls back to the UUID when no explicit gettext domain was
included in the metadata.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2888>
js/extensions/sharedInternals.js